export const columns = [
    {
      title: '菜单ID',
      dataIndex: 'id',
      key: 'id',
      span: 24,
      list: false,
      view: false,
      add: false,
      edit: true,
      component: 'Input',
      componentProps: {
        type: "hidden",
        maxlength: 20,
      },
      rules: [{ required: false, message: '请输入菜单ID', trigger: 'blur' }]
    },
    {
      title: '应用编码',
      dataIndex: 'appCode',
      key: 'appCode',
      span: 0,
      list: false,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
        type: "hidden",
      },
      rules: [{ required: false, message: '请输入应用编码', trigger: 'blur' }]
    },
    {
      title: '菜单类型',
      dataIndex: 'type',
      key: 'type',
      span: 12,
      list: true,
      view: true,
      add: true,
      edit: true,
      defaultValue: 2,
      component: 'Dict',
      componentProps: {
        code: "sys_menu_type",
        renderType: "RadioGroup",
        dataType: "number",
      },
      rules: [{ required: false, message: '请输入菜单类型', trigger: 'blur' }]
    },
    {
      title: '上级菜单',
      dataIndex: 'parentId',
      key: 'parentId',
      span: 12,
      list: false,
      view: false,
      add: true,
      edit: true,
      component: 'TreeSelect',
      componentProps: {
        api: "/sys/menu/list",
        labelField: "name",
        valueField: "id",
        immediate: false,
        treeDataSimpleMode: {"id":"id","pId":"parentId","rootPId":"0"},
        params(values: any){
          return {
            m_EQ_appCode: `${values.appCode}`,
            test: `123`,
            aa: `3`,
          }
        }
      },
      rules: [{ required: false, message: '请输入上级菜单', trigger: 'blur' }]
    },
    {
      title: '菜单名称',
      dataIndex: 'name',
      key: 'name',
      span: 12,
      list: true,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
        type: "text",
        maxlength: 20,
      },
      rules: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }]
    },
    {
      title: '唯一编码',
      dataIndex: 'code',
      key: 'code',
      span: 12,
      list: true,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
      },
      rules: [{ required: true, message: '请输入唯一编码', trigger: 'blur' }]
    },
    {
      title: '路由地址',
      dataIndex: 'path',
      key: 'path',
      span: 12,
      list: true,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
      },
      rules: [{ required: false, message: '请输入路由地址', trigger: 'blur' }]
    },
    {
      title: '组件地址',
      dataIndex: 'component',
      key: 'component',
      span: 12,
      list: true,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      dynamicDisabled(values: any) {
        return values.type == 2;
      },
      componentProps: {
      },
      rules: [{ required: false, message: '请输入组件地址', trigger: 'blur' }]
    },
    {
      title: '打开方式',
      dataIndex: 'openType',
      key: 'openType',
      span: 12,
      list: false,
      view: true,
      add: true,
      edit: true,
      defaultValue: 2,
      component: 'Dict',
      componentProps: {
        renderType: "RadioGroup",
        code: "sys_menu_open_type",
        dataType: "number",
      },
      rules: [{ required: false, message: '请输入打开方式', trigger: 'blur' }]
    },
    {
      title: '菜单图标',
      dataIndex: 'icon',
      key: 'icon',
      span: 12,
      list: false,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
      },
      rules: [{ required: false, message: '请输入菜单图标', trigger: 'blur' }]
    },
    {
      title: '内外链地址',
      dataIndex: 'url',
      key: 'url',
      span: 12,
      list: false,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
      },
      rules: [{ required: false, message: '请输入内外链地址', trigger: 'blur' }]
    },
    {
      title: '排序',
      dataIndex: 'sort',
      key: 'sort',
      span: 12,
      list: false,
      view: true,
      add: true,
      edit: true,
      component: 'Input',
      componentProps: {
        type: "number",
      },
      rules: [{ required: false, message: '请输入排序', trigger: 'blur' }]
    },
    {
      title: '是否启用',
      dataIndex: 'enabled',
      key: 'enabled',
      span: 6,
      list: false,
      view: true,
      add: true,
      edit: true,
      defaultValue: 1,
      component: 'Dict',
      componentProps: {
        renderType: "RadioGroup",
        code: "yes_no",
      },
      rules: [{ required: false, message: '请输入是否启用', trigger: 'blur' }]
    },
    {
      title: '是否显示',
      dataIndex: 'isShow',
      key: 'isShow',
      span: 6,
      list: false,
      view: true,
      add: true,
      edit: true,
      defaultValue: 1,
      component: 'Dict',
      componentProps: {
        renderType: "RadioGroup",
        code: "yes_no",
      },
      rules: [{ required: false, message: '请输入是否显示', trigger: 'blur' }]
    },
    {
      title: '是否同步',
      dataIndex: 'isSync',
      key: 'isSync',
      span: 6,
      list: false,
      view: true,
      add: true,
      edit: true,
      defaultValue: 1,
      component: 'Dict',
      componentProps: {
        renderType: "RadioGroup",
        code: "yes_no",
      },
      rules: [{ required: false, message: '请输入是否同步', trigger: 'blur' }]
    },
    {
      title: '是否缓存',
      dataIndex: 'isCache',
      key: 'isCache',
      span: 6,
      list: false,
      view: true,
      add: true,
      edit: true,
      defaultValue: 1,
      component: 'Dict',
      componentProps: {
        renderType: "RadioGroup",
        code: "yes_no",
      },
      rules: [{ required: false, message: '请输入是否缓存', trigger: 'blur' }]
    },]